#include "stdafx.h"
#pragma once
//#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
//#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
//#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_


#define WIN32_LEAN_AND_MEAN	
#define _CRT_SECURE_NO_DEPRECATE
#include <windows.h>
#include <objbase.h>
#include "CommonFunction.h"

#include "UIlib.h"

using namespace DuiLib;




class CLianXiYinBiao : public CWindowWnd, public INotifyUI
{
public:
	CLianXiYinBiao()
	{

	};
	CLianXiYinBiao(CPaintManagerUI PaintManager):m_PaintManager(PaintManager)
	{

	};
	LPCTSTR GetWindowClassName() const
	{ 
		return _T("UIMainFrame"); 
	};
	UINT GetClassStyle() const 
	{ 
		return UI_CLASSSTYLE_FRAME | CS_DBLCLKS; 
	};
	void OnFinalMessage(HWND /*hWnd*/) 
	{ 
		/*delete this;*/
	};
	//////////////////////////////
	void InitSymbolCtrls();
	void InitSymbolSymbol(LPCTSTR strId);
	bool IsSymbolWord(const TNotifyUI& msg);
	bool IsSymbolName(const TNotifyUI& msg);
	static bool OnSymbolWordNotify(void* event);
	CString GetSingleField(LPCTSTR lpStrSql, ...);
	HRESULT Speak(LPCWSTR lpwText, DWORD dwFlags=SPF_ASYNC);
	HRESULT Speak(LPCSTR lpText, DWORD dwFlags=SPF_ASYNC)
	{
		return Speak(CA2W(lpText), dwFlags);
	}
	////////////////////////////////
	void Init() { }
	void OnPrepare(TNotifyUI& msg) ;
	void Notify(TNotifyUI& msg);
	LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
public:
	
	CPaintManagerUI m_PaintManager;
	bool    m_bInitOK;
	emSkinId    m_nSkinId;
	bool    m_bRegistered;

	

};
//#endif
static LPCTSTR g_SymbolNames[14][6]=
{
	{_T("symqianyuanyin1btn"),          _T("symqianyuanyin2btn"),           _T("symqianyuanyin3btn"),           _T("symqianyuanyin4btn"),           _T("symqianyuanyin5btn"),           _T("symqianyuanyin6btn")},
	{_T("symzhongyuanyin1btn"),         _T("symzhongyuanyin2btn"),          _T("symzhongyuanyin3btn"),          _T("symzhongyuanyin4btn"),          _T("symzhongyuanyin5btn"),          _T("symzhongyuanyin6btn")},
	{_T("symhouyuanyin1btn"),           _T("symhouyuanyin2btn"),            _T("symhouyuanyin3btn"),            _T("symhouyuanyin4btn"),            _T("symhouyuanyin5btn"),            _T("symhouyuanyin6btn")},
	{_T("symkaiheshuangyuanyin1btn"),   _T("symkaiheshuangyuanyin2btn"),    _T("symkaiheshuangyuanyin3btn"),    _T("symkaiheshuangyuanyin4btn"),    _T("symkaiheshuangyuanyin5btn"),    _T("symkaiheshuangyuanyin6btn")},
	{_T("symjizhongshuangyuanyin1btn"), _T("symjizhongshuangyuanyin2btn"),  _T("symjizhongshuangyuanyin3btn"),  _T("symjizhongshuangyuanyin4btn"),  _T("symjizhongshuangyuanyin5btn"),  _T("symjizhongshuangyuanyin6btn")},
	{_T("symbaopoyin1btn"),             _T("symbaopoyin2btn"),              _T("symbaopoyin3btn"),              _T("symbaopoyin4btn"),              _T("symbaopoyin5btn"),              _T("symbaopoyin6btn")},
	{_T("symqingfuyin1btn"),            _T("symqingfuyin2btn"),             _T("symqingfuyin3btn"),             _T("symqingfuyin4btn"),             _T("symqingfuyin5btn"),             _T("symqingfuyin6btn")},
	{_T("symmocayin1btn"),              _T("symmocayin2btn"),               _T("symmocayin3btn"),               _T("symmocayin4btn"),               _T("symmocayin5btn"),               _T("symmocayin6btn")},
	{_T("symmoca2yin1btn"),             _T("symmoca2yin2btn"),              _T("symmoca2yin3btn"),              _T("symmoca2yin4btn"),              _T("symmoca2yin5btn"),              _T("symmoca2yin6btn")},
	{_T("sympocayin1btn"),              _T("sympocayin2btn"),               _T("sympocayin3btn"),               _T("sympocayin4btn"),               _T("sympocayin5btn"),               _T("sympocayin6btn")},
	{_T("sympoca2yin1btn"),             _T("sympoca2yin2btn"),              _T("sympoca2yin3btn"),              _T("sympoca2yin4btn"),              _T("sympoca2yin5btn"),              _T("sympoca2yin6btn")},
	{_T("symbiyin1btn"),                _T("symbiyin2btn"),                 _T("symbiyin3btn"),                 _T("symbiyin4btn"),                 _T("symbiyin5btn"),                 _T("symbiyin6btn")},
	{_T("symsheceyin1btn"),             _T("symsheceyin2btn"),              _T("symsheceyin3btn"),              _T("symsheceyin4btn"),              _T("symsheceyin5btn"),              _T("symsheceyin6btn")},
	{_T("symbanyuanyin1btn"),           _T("symbanyuanyin2btn"),            _T("symbanyuanyin3btn"),            _T("symbanyuanyin4btn"),            _T("symbanyuanyin5btn"),            _T("symbanyuanyin6btn")},
};

static LPCTSTR g_SymWord[5][4] =
{
	{_T("symword00btn"), _T("symword01btn"), _T("symword02btn"), _T("symword03btn")},
	{_T("symword10btn"), _T("symword11btn"), _T("symword12btn"), _T("symword13btn")},
	{_T("symword20btn"), _T("symword21btn"), _T("symword22btn"), _T("symword23btn")},
	{_T("symword30btn"), _T("symword31btn"), _T("symword32btn"), _T("symword33btn")},
	{_T("symword40btn"), _T("symword41btn"), _T("symword42btn"), _T("symword43btn")},
};

